<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>注册</title>
</head>
<body>
  <h1>欢迎注册</h1>
  <div style="color: darkorange;" name="message">
    {% if message %}
      {{ message }}
    {% endif %}
  </div>

  <!--登录表单-->
  <form action="/register/" method="post">
    {% csrf_token %}
    <label>用户名：</label>
    <input type="text" name="username" placeholder="1-20个字，中英文或-">
    <br>
    <label>密码：</label>
    <input type="password" name="password">
    <br>
    <label>邮箱：</label>
    <input type="email" name="email">
    <br>
    <input type="submit" value="注册">
  </form>
  <a href="/login/">
    <input type="submit" value="已有账户，去登录">
  </a>
</body>
</html>